3.3 \(\int x (d+e x) (a+b \log (c x^n)) \, dx\)

Optimal. Leaf size=48 \[ \frac {1}{6} \left (3 d x^2+2 e x^3\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {1}{4} b d n x^2-\frac {1}{9} b e n x^3 \]

[Out]

-1/4*b*d*n*x^2-1/9*b*e*n*x^3+1/6*(2*e*x^3+3*d*x^2)*(a+b*ln(c*x^n))

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 48, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {43, 2334, 12} \[ \frac {1}{6} \left (3 d x^2+2 e x^3\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {1}{4} b d n x^2-\frac {1}{9} b e n x^3 \]

Antiderivative was successfully verified.

[In]

Int[x*(d + e*x)*(a + b*Log[c*x^n]),x]

[Out]

-(b*d*n*x^2)/4 - (b*e*n*x^3)/9 + ((3*d*x^2 + 2*e*x^3)*(a + b*Log[c*x^n]))/6

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2334

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]
] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q, 1] && EqQ[m, -1])

Rubi steps

\begin {align*} \int x (d+e x) \left (a+b \log \left (c x^n\right )\right ) \, dx &=\frac {1}{6} \left (3 d x^2+2 e x^3\right ) \left (a+b \log \left (c x^n\right )\right )-(b n) \int \frac {1}{6} x (3 d+2 e x) \, dx\\ &=\frac {1}{6} \left (3 d x^2+2 e x^3\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {1}{6} (b n) \int x (3 d+2 e x) \, dx\\ &=\frac {1}{6} \left (3 d x^2+2 e x^3\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {1}{6} (b n) \int \left (3 d x+2 e x^2\right ) \, dx\\ &=-\frac {1}{4} b d n x^2-\frac {1}{9} b e n x^3+\frac {1}{6} \left (3 d x^2+2 e x^3\right ) \left (a+b \log \left (c x^n\right )\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 48, normalized size = 1.00 \[ \frac {1}{36} x^2 \left (6 a (3 d+2 e x)+6 b (3 d+2 e x) \log \left (c x^n\right )-b n (9 d+4 e x)\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[x*(d + e*x)*(a + b*Log[c*x^n]),x]

[Out]

(x^2*(6*a*(3*d + 2*e*x) - b*n*(9*d + 4*e*x) + 6*b*(3*d + 2*e*x)*Log[c*x^n]))/36

________________________________________________________________________________________

fricas [A]  time = 0.43, size = 69, normalized size = 1.44 \[ -\frac {1}{9} \, {\left (b e n - 3 \, a e\right )} x^{3} - \frac {1}{4} \, {\left (b d n - 2 \, a d\right )} x^{2} + \frac {1}{6} \, {\left (2 \, b e x^{3} + 3 \, b d x^{2}\right )} \log \relax (c) + \frac {1}{6} \, {\left (2 \, b e n x^{3} + 3 \, b d n x^{2}\right )} \log \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(e*x+d)*(a+b*log(c*x^n)),x, algorithm="fricas")

[Out]

-1/9*(b*e*n - 3*a*e)*x^3 - 1/4*(b*d*n - 2*a*d)*x^2 + 1/6*(2*b*e*x^3 + 3*b*d*x^2)*log(c) + 1/6*(2*b*e*n*x^3 + 3
*b*d*n*x^2)*log(x)

________________________________________________________________________________________

giac [A]  time = 0.31, size = 73, normalized size = 1.52 \[ \frac {1}{3} \, b n x^{3} e \log \relax (x) - \frac {1}{9} \, b n x^{3} e + \frac {1}{3} \, b x^{3} e \log \relax (c) + \frac {1}{2} \, b d n x^{2} \log \relax (x) - \frac {1}{4} \, b d n x^{2} + \frac {1}{3} \, a x^{3} e + \frac {1}{2} \, b d x^{2} \log \relax (c) + \frac {1}{2} \, a d x^{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(e*x+d)*(a+b*log(c*x^n)),x, algorithm="giac")

[Out]

1/3*b*n*x^3*e*log(x) - 1/9*b*n*x^3*e + 1/3*b*x^3*e*log(c) + 1/2*b*d*n*x^2*log(x) - 1/4*b*d*n*x^2 + 1/3*a*x^3*e
 + 1/2*b*d*x^2*log(c) + 1/2*a*d*x^2

________________________________________________________________________________________

maple [C]  time = 0.22, size = 264, normalized size = 5.50 \[ -\frac {i \pi b e \,x^{3} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )}{6}+\frac {i \pi b e \,x^{3} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{6}+\frac {i \pi b e \,x^{3} \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{6}-\frac {i \pi b e \,x^{3} \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{6}-\frac {i \pi b d \,x^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )}{4}+\frac {i \pi b d \,x^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{4}+\frac {i \pi b d \,x^{2} \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{4}-\frac {i \pi b d \,x^{2} \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{4}-\frac {b e n \,x^{3}}{9}+\frac {b e \,x^{3} \ln \relax (c )}{3}+\frac {a e \,x^{3}}{3}-\frac {b d n \,x^{2}}{4}+\frac {b d \,x^{2} \ln \relax (c )}{2}+\frac {a d \,x^{2}}{2}+\frac {\left (2 e x +3 d \right ) b \,x^{2} \ln \left (x^{n}\right )}{6} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(e*x+d)*(b*ln(c*x^n)+a),x)

[Out]

1/6*b*x^2*(2*e*x+3*d)*ln(x^n)+1/6*I*Pi*b*e*x^3*csgn(I*x^n)*csgn(I*c*x^n)^2-1/6*I*Pi*b*e*x^3*csgn(I*x^n)*csgn(I
*c*x^n)*csgn(I*c)-1/6*I*Pi*b*e*x^3*csgn(I*c*x^n)^3+1/6*I*Pi*b*e*x^3*csgn(I*c*x^n)^2*csgn(I*c)+1/3*ln(c)*b*e*x^
3-1/9*b*e*n*x^3+1/3*a*e*x^3+1/4*I*Pi*b*d*x^2*csgn(I*x^n)*csgn(I*c*x^n)^2-1/4*I*Pi*b*d*x^2*csgn(I*x^n)*csgn(I*c
*x^n)*csgn(I*c)-1/4*I*Pi*b*d*x^2*csgn(I*c*x^n)^3+1/4*I*Pi*b*d*x^2*csgn(I*c*x^n)^2*csgn(I*c)+1/2*ln(c)*b*d*x^2-
1/4*b*d*n*x^2+1/2*a*d*x^2

________________________________________________________________________________________

maxima [A]  time = 0.51, size = 57, normalized size = 1.19 \[ -\frac {1}{9} \, b e n x^{3} + \frac {1}{3} \, b e x^{3} \log \left (c x^{n}\right ) - \frac {1}{4} \, b d n x^{2} + \frac {1}{3} \, a e x^{3} + \frac {1}{2} \, b d x^{2} \log \left (c x^{n}\right ) + \frac {1}{2} \, a d x^{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(e*x+d)*(a+b*log(c*x^n)),x, algorithm="maxima")

[Out]

-1/9*b*e*n*x^3 + 1/3*b*e*x^3*log(c*x^n) - 1/4*b*d*n*x^2 + 1/3*a*e*x^3 + 1/2*b*d*x^2*log(c*x^n) + 1/2*a*d*x^2

________________________________________________________________________________________

mupad [B]  time = 3.63, size = 51, normalized size = 1.06 \[ \ln \left (c\,x^n\right )\,\left (\frac {b\,e\,x^3}{3}+\frac {b\,d\,x^2}{2}\right )+\frac {d\,x^2\,\left (2\,a-b\,n\right )}{4}+\frac {e\,x^3\,\left (3\,a-b\,n\right )}{9} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a + b*log(c*x^n))*(d + e*x),x)

[Out]

log(c*x^n)*((b*d*x^2)/2 + (b*e*x^3)/3) + (d*x^2*(2*a - b*n))/4 + (e*x^3*(3*a - b*n))/9

________________________________________________________________________________________

sympy [B]  time = 0.87, size = 87, normalized size = 1.81 \[ \frac {a d x^{2}}{2} + \frac {a e x^{3}}{3} + \frac {b d n x^{2} \log {\relax (x )}}{2} - \frac {b d n x^{2}}{4} + \frac {b d x^{2} \log {\relax (c )}}{2} + \frac {b e n x^{3} \log {\relax (x )}}{3} - \frac {b e n x^{3}}{9} + \frac {b e x^{3} \log {\relax (c )}}{3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(e*x+d)*(a+b*ln(c*x**n)),x)

[Out]

a*d*x**2/2 + a*e*x**3/3 + b*d*n*x**2*log(x)/2 - b*d*n*x**2/4 + b*d*x**2*log(c)/2 + b*e*n*x**3*log(x)/3 - b*e*n
*x**3/9 + b*e*x**3*log(c)/3

________________________________________________________________________________________